-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Draft]: Calculate local markov blanket against true graph for parted nodes that passed AD Test #1757
base: development
Are you sure you want to change the base?
Conversation
@@ -103,7 +103,7 @@ public static boolean isClique(Collection<Node> set, Graph graph) { | |||
* @param graph a DAG, CPDAG, MAG, or PAG. | |||
* @return a {@link edu.cmu.tetrad.graph.Graph} object | |||
*/ | |||
public static Graph markovBlanketSubgraph(Node target, Graph graph) { | |||
public static Graph markovBlanketSubgraph(Node target, Graph graph) { // TODO VBC: @Joe is this the more general method you recommended? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdramsey for confirmation :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the method I had in mind:
public Graph getMarkovBlanketSubgraph(Graph graph, Node targetNode) {
EdgeListGraph g = new EdgeListGraph();
Set<Node> nodes = GraphUtils.markovBlanket(targetNode, g);
return g.subgraph(new ArrayList<>(nodes));
}
You could put that method somewhere helpful; it may not already exist in the code.
|
||
double precision = (double) truePositive.size() / xMBLookupGraphEdges.size(); | ||
double recall = (double) truePositive.size() / xMBEstimatedGraphEdges.size(); | ||
return getPrecision ? precision : recall; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These outprints seems correct to me, maybe you want a second check : )
System.out.println("@@@@@@@@@@@@@@@@"); | ||
|
||
HashSet<Edge> truePositive = new HashSet<>(xMBEstimatedGraphEdges); | ||
// TODO VBC: QUESTION FOr DISCUSSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdramsey We need to discuss this tho
As for what exactly to report, I think I would myself need input from Peter here. What you're reporting sounds fine to me, but he may want something different... |
WIP! Need to check with Joe on how to find a node in estimated graph's corresponding node in the true graph. I tried using node's name, but it doesnt seem to work from unit test result.